<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var user={
        name:"林东松",
        age:3,
        sex:"男"
    };
    var str = JSON.stringify(user);
    console.log(str);
    var user2 = JSON.parse(str);
    console.log(user2);
</script>
</body>
</html>